let vm = null;
export const send_this = (_this) => {
  vm = _this;
};
export const formItems = [
  {
    prop: "sys_user_id",
    label: "公众号",
    placeholder: "请选择公众号",
    lg: 4,
    type: "select",
    options: [],
    key: "id",
    value: (item) => {
      return item.username + '(' + item.nickname + ')'
    },
    otherOptions: {},
  },
  {
    prop: "id",
    label: "粉丝ID",
    placeholder: "请输入粉丝ID",
    lg: 4,
    type: "input",
    // key: "id",
    // value: (item) => {
    //   return `${item.username}(${item.nickname})`;
    // },
    // options: [],
    otherOptions: {
      // style: "width:200px",
    },
  },
  {
    prop: "nickname",
    label: "粉丝昵称",
    placeholder: "请输入粉丝昵称",
    lg: 4,
    type: "input",
    // key: "id",
    // value: (item) => {
    //   return `${item.username}(${item.nickname})`;
    // },
    // options: [],
    otherOptions: {
      // style: "width:200px",
    },
  },
  {
    prop: "status",
    label: "状态",
    type: "select",
    options: [
      {
        key: 1,
        value: "待处理",
      },
      {
        key: 2,
        value: "处理中",
      },
      {
        key: 3,
        value: "处理成功",
      },
      {
        key: 4,
        value: "处理失败",
      },
    ],
    placeholder: "请选择状态",
    lg: 4,
    otherOptions: {
      // style: "width:200px",
    },
  },
  {
    prop: "created_at",
    label: "创建时间",
    lg: 12,
    type: "datetimerange",
    valueFormat: "x",
    otherOptions: {
      defaultTime: [
        new Date(2000, 1, 1, 0, 0, 0),
        new Date(2000, 1, 1, 23, 59, 59),
      ],
    },
  },
];
export const propList = [
  {
    label: "提现订单号",
    prop: "order_sn",
    width: 120,
    showOverflowTooltip: false,
  },
  {
    label: "公众号",
    prop: "sysUser.nickname",
    showOverflowTooltip: false,
  },
  {
    label: "粉丝昵称",
    prop: "user.nickname",
    showOverflowTooltip: false,
  },
  {
    label: "粉丝头像",
    slotName: "headimgurl",
    prop: "user.headimgurl",
    width: 120,
  },
  {
    label: "粉丝ID",
    prop: "user.id",
  },

  {
    label: "微信号",
    prop: "wx_num",
    width: 120,
    showOverflowTooltip: false,

  },
  {
    label: "提现金额",
    prop: "money",
  },
  {
    label: "提现手续费",
    prop: "rate",
  },
  {
    label: "实际到账金额",
    prop: "real_money",
  },
  {
    label: "提现状态",
    slotName: "status",
    width: 100,
  },
  {
    label: "渠道订单号",
    prop: "channel_order_sn",
    width: 120,
    showOverflowTooltip: false,
  },
  {
    label: "失败原因",
    prop: "fail_text",
    // width: 100,
  },
  // 由范文海打款至客户的银行卡
  {
    label: "备注",
    width: 100,

    prop: "remark",
    showOverflowTooltip: false,

  },
  {
    label: "创建时间",
    prop: "created_at",
    width: 160,
    showOverflowTooltip: false,

  },
  {
    label: "修改时间",
    prop: "updated_at",
    width: 160,
    showOverflowTooltip: false,

  },
  {
    label: "操作",
    slotName: "op",
    fixed: "right",
    width: 130,
    showOverflowTooltip: false,
  },
];
export const dialogConfig = {
  title: "审核",
  formConfig: {
    labelWidth: "88px",
    colLayout: { span: 24 },
    formData: {},
    formItems: [
      {
        label: "提示",
        prop: "num",
        // isHide: true,
        type: "custom",
      },
      {
        label: "提现信息",
        prop: "userinfo",
        // isHide: true,
        type: "custom",
      },
      {
        label: "审核",
        prop: "status",
        type: "radio",
        button: true,
        // defaultValue: 1,
        radioList: [
          // {
          //   value: 1,
          //   label: "待处理",
          // },
          // {
          //   value: 2,
          //   label: "处理中",
          // },
          {
            value: 3,
            label: "自动打款",
          },
          {
            value: 4,
            label: "打款失败",
          },
          {
            value: -1,
            label: "手动打款",
          },

        ],
        change(value, formItems) {
          // console.log(vm);
          vm.radioChange(value, formItems);
        },
      },
      {
        label: "密码",
        prop: "password",
        type: "password",
        placeholder: "请输入",
        isHide: true,
      },
      {
        label: "打款凭证",
        prop: "img",
        isHide: true,
        type: "custom",
        placeholder: "请上传",
      },
      {
        label: "失败原因",
        prop: "fail_text",
        isHide: true,
        type: "textarea",
        placeholder: "请输入",
      },
      {
        label: "备注",
        prop: "remark",
        type: "textarea",
        placeholder: "请输入",
      },
    ],
    formDataRules: {
      status: [{ required: true, message: "请选择", trigger: "blur" }],
      password: [{ required: true, message: "请输入", trigger: "blur" }],
    },
  },
};

export const dialogConfig2 = {
  title: "批量处理",
  formConfig: {
    labelWidth: "88px",
    colLayout: { span: 24 },
    formData: {},
    formItems: [
      {
        label: "处理数量",
        prop: "num",
        // isHide: true,
        type: "custom",
      },
      {
        label: "审核",
        prop: "status",
        type: "radio",
        button: true,
        radioList: [
          {
            value: 3,
            label: "自动打款",
          },
          {
            value: 4,
            label: "打款失败",
          },
          {
            value: -1,
            label: "手动打款",
          },
        ],
        change(value, formItems) {
          vm.radioChange(value, formItems);
        },
      },
      {
        label: "密码",
        prop: "password",
        type: "password",
        placeholder: "请输入",
      },

      {
        label: "失败原因",
        prop: "fail_text",
        isHide: true,
        type: "textarea",
        placeholder: "请输入",
      },
      {
        label: "备注",
        prop: "remark",
        type: "textarea",
        placeholder: "请输入",
      },
    ],
    formDataRules: {
      status: [{ required: true, message: "请选择", trigger: "blur" }],
      password: [{ required: true, message: "请输入", trigger: "blur" }],
    },
  },
};
